let app = getApp();
let iconUrl = 'https://atush.vip/static/icons/';

Component({
    externalClasses: ['my-class'],
    /**
     * 组件的属性列表
     */
    properties: {
        isLike: {
            type: Boolean,
            value: false
        },
        icContact: {
            type: Boolean,
            value: false
        }
    },

    /**
     * 组件的初始数据
     */
    data: {
        lang: null,
        iconUrl: iconUrl
    },

    /**
     * 组件的方法列表
     */
    methods: {
        // 收藏
        onLike(event) {
            this.triggerEvent('like', event)
            // this.setData({ isLike: !this.data.isLike })
        },

        // 打电话
        onContact(event) {
            this.triggerEvent('contact', event)
            this.setData({ icContact: !this.data.icContact })
        }
    },
    lifetimes: {
        attached: function() {
            this.setData({ lang: app.globalData.lang })
        }
    }
})
